startForegroundService

open fun startForegroundService(@NonNull context: Context, @NonNull intent: Intent)(source)

startForegroundService() was introduced in O, just call startService for before O.

Parameters

context

Context to start Service from.

intent

The description of the Service to start.

See also